def loadLogger(app):
    """
        设置日志路径.级别。
        参考: https://blog.csdn.net/lvbu89757/article/details/95231967
    """
    import logging
    from logging.handlers import RotatingFileHandler
    logging.basicConfig(level=logging.DEBUG)
    file_log_handler = RotatingFileHandler('logs/log', maxBytes=1024 * 1024, backupCount=10)
    formatter = logging.Formatter('%(levelname)s %(filename)s %(lineno)d %(message)s')
    file_log_handler.setFormatter(formatter)
    logging.getLogger().addHandler(file_log_handler)
    """
    app.logger.debug('test, A value for debugging')
    app.logger.warning('test, A value for warning')
    """


import flaskApp
loadLogger(flaskApp.app)        #加载日志类。
import controller               #加载controller，注册url对应的controller。
flaskApp.app.run()